import Flex from "@/components/flex";
import { Form } from '@/components/base';
import * as UI from './ui'
import styles from './index.module.less';
import React from 'react';
import { useNavigate } from "react-router-dom";
import * as pages from '@/pages';

export default function OrderCreateForm() {

    const navigate = useNavigate()
    const [form] = Form.useForm();

    const handleSave = React.useCallback(() => {
        navigate(`/${pages.orderDetail.name}?id=123`)
    }, [navigate])

    return (
        <Flex vertical style={{ backgroundColor: '#f5f5f5', height: '100vh' }}>
            <UI.Header onSave={handleSave} />
            <Form className={styles['form']} layout='vertical' requiredMarkStyle='asterisk' form={form}>
                <UI.BasicInfoForm />
            </Form>
        </Flex>
    );
}
